import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom';
import App from '../src/App';

describe('App组件', () => {
  test('渲染初始界面', () => {
    render(<App />);
    expect(screen.getByText('智能问题研究分析平台')).toBeInTheDocument();
    expect(screen.getByPlaceholderText('输入您要研究的复杂问题...')).toBeInTheDocument();
  });

  test('问题输入更新状态', () => {
    render(<App />);
    const input = screen.getByPlaceholderText('输入您要研究的复杂问题...');
    fireEvent.change(input, { target: { value: '测试问题' } });
    expect(input.value).toBe('测试问题');
  });

  // 添加更多交互测试...
});